package com.duoketech.model.modulepic;
import com.duoketech.model.AbstractModel;
public class ModulePic extends AbstractModel<ModulePic>{
    public static final ModulePic dao = new ModulePic();

    public static final String ID = "id";//
    public static final String TYPE = "type";//图片类型
    public static final String COVER = "cover";//图片地址
    public static final String OBJ_ID = "obj_id";//对象 ID
    public static final String SORT = "sort";//排序
    public static final String REMARK = "remark";//备注说明
    public static final String STATUS = "status";//状态
    public static final String CREATE_TIME = "create_time";//创建时间
    public static final String MODIFY_TIME = "modify_time";//修改时间
    public static final String NAME = "name";//文件名称
    public static final String URL = "url";//指定连接地址


    public static final int TYPE_ADS_INDEX = 1;
    public static final int TYPE_ADS_MARKET = 2;
    @Override
    public String tableName() {
        return "t_module_pic";
    }

    @Override
    public String status() {
        String result="未知";
        if(getInt(STATUS)==STATUS_NORMAL){
            result="正常状态";
        }else if(getInt(STATUS)== STATUS_DEL){
            result="已删除";
        }
        return result;
    }

    public String type() {
        String result="未知";
        if(getInt(TYPE)==TYPE_ADS_INDEX){
            result="首页广告图片";
        }else if(getInt(TYPE)== TYPE_ADS_MARKET){
            result="商城广告图片";
        }
        return result;
    }
}